home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_tem_tiki1statue.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
29KB
|
994 lines
# Jones 3D Cog Script
#
# TEM_Tiki1Statue.cog
#
# tikikey2 = 99
#
# columnLift = statue
# columnBock = base
#
# [TRM]
#
# (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
message startup
message activated
message blocked
# ** misc local stuff **
thing player local
thing indy local
thing tikiStatic local
# ** buttons **
thing button1
thing button2
thing button3
thing button4
# ** statue **
thing base
thing statue
thing tiki
# ** cameras **
thing but1Cam
thing but2Cam
thing but3Cam
thing but4Cam
thing holeCam
# ** targets **
thing camTargPos1
thing camTargPos2
thing camTargPos3
thing camTargPos4
thing target1
# ** button cam targets **
thing but1MoveTarg local
thing but2MoveTarg local
thing but3MoveTarg local
thing but4MoveTarg local
# ** walk targets **
thing but1_walkTarg
thing but2_walkTarg
thing but3_walkTarg
thing but4_walkTarg
# ** misc **
thing columnBase
thing columnHooks
# ** templates **
template tplActor=indy_sh_actor local
# ** keys **
keyframe inReach=in_pickup.key local
cog talkCog local
cog cameraShake
cog hint_Cog
# ** voice lines **
sound inWhat=Inxj007.wav local # whoa!
sound in_Line0=Inxj098.wav local # It won't budge.
sound say_Tiki=tm03j03a.wav local # a tiki statue...
# ** raise/lower sounds **
sound snd_MoveStart=nub_weight_start_c.wav local
sound snd_MoveMove=nub_weight_move_c.wav local
sound snd_MoveStop=nub_weight_stop_c.wav local
# ** rotate sounds **
sound snd_RotateStart=olv_quetzdoor_start_c.wav local
sound snd_RotateMove=olv_quetzdoor_move_c.wav local
sound snd_RotateStop=olv_quetzdoor_stop_c.wav local
# ** subroutines **
flex but1Push local
flex but2Push local
flex but3Push local
flex but4Push local
flex getTiki local
flex speak local
# ** ints **
int done=0 local
int playing=0 local
int gotIt=0 local
int but1_Ready=1 local
int but2_Ready=1 local
int but3_Ready=0 local
int but4_Ready=0 local
int loopSound local
int rotSound local
int curCam local
int statue_Pos=0 local
int base_Pos=0 local
int tiki_Moved=0 local
int tiki_Locked=0 local
int tiki_Released=0 local
int tiki_CanLower=0 local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
SetThingLight(base, '0.8 0.7 0.7', 0.001, 0.1);
SetThingLight(statue, '0.8 0.7 0.7', 0.001, 0.1);
SetThingLight(tiki, '0.5 0.5 0.3', 0.001, 0.1);
SetThingLight(columnBase, '0.5 0.5 0.3', 0.001, 0.1);
SetThingLight(columnHooks, '0.3 0.3 0.2', 0.001, 0.1);
SetCollideType(columnHooks, 0);
return;
# ========================================================================================
activated:
curCam = GetCurrentCamera();
if((GetSenderRef() == button1) && (playing == 0))
{
playing = 1;
Call but1Push;
}
if((GetSenderRef() == button2) && (playing == 0))
{
playing = 1;
Call but2Push;
}
if((GetSenderRef() == button3) && (playing == 0))
{
playing = 1;
Call but3Push;
}
if((GetSenderRef() == button4) && (playing == 0))
{
playing = 1;
Call but4Push;
}
if((GetSenderRef() == tiki) && (gotIt == 0))
{
gotIt = 1;
Call getTiki;
}
return;
# ========================================================================================
but1Push:
# do cutscene stuff
MakeMeStop();
StartCutscene(2);
# offset camera
SetExtCamLookOffsetToThing(player);
SetExtCamOffsetToThing(but1Cam);
# put away any weapon
DeselectWeaponWait(player);
# statue is in proper position, move it
if(but1_Ready == 1)
{
# push in button1
PlayMode(player, 60, 0);
Sleep(0.3);
MoveToFrame(button1, 1, 1.0);
WaitForStop(button1);
Sleep(0.5);
# switch to but1Cam
SetCameraFocus(2, but1Cam);
SetCameraSecondaryFocus(2, player);
SetCurrentCamera(2);
SetCameraFOV(90, 0, 0.0);
# create indy actor
indy = CreateThing(tplActor, player);
CaptureThing(indy);
SetCollideType(indy, 0);
# outfit indy actor
CopyPlayerHolsters(player, indy);
# hide player show indy
SetThingFlags(player, 0x80000);
ClearThingFlags(indy, 0x80000);
# set camera interp speed turn on look interp
SetCameraInterpSpeed(2, 2.0);
SetCameraLookInterp(2, 1);
Sleep(0.01);
# interp to camTargPos1 (looking at statue)
SetCameraSecondaryFocus(2, camTargPos1);
# indy looks at statue
AISetLookThing(indy, camTargPos1);
# walk indy closer to statue
AISetMoveSpeed(indy, 1.0);
AISetLookThing(indy, but1_walkTarg);
AISetMoveThing(indy, but1_walkTarg, 0);
# remove collisions
SetCollideType(statue, 0);
SetCollideType(base, 0);
SetCollideType(columnBase, 0);
Sleep(0.01);
# play move sound fx
PlaySoundThing(snd_MoveStart, base, 1.0, 15.0, 25.0, 0);
loopSound = PlaySoundThing(snd_MoveMove, base, 1.0, 15.0, 25.0, 1);
# raise statue to pos 1
if((statue_Pos == 0) && (base_Pos == 0))
{
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 0.5'), 3.0);
if(tiki_Moved == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 0.5'), 3.0);
statue_Pos = 1;
but3_Ready = 1;
}
# lower statue to pos 0
else if((statue_Pos == 1) && (base_Pos == 0))
{
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 -0.5'), 3.0);
if(tiki_Moved == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 -0.5'), 3.0);
statue_Pos = 0;
but3_Ready = 0;
}
# lower statue to pos 1 inside base
else if((statue_Pos == 2) && (base_Pos == 1))
{
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 -0.5'), 3.0);
if(tiki_Moved == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 -0.5'), 3.0);
statue_Pos = 1;
tiki_Locked = 0;
but2_Ready = 0;
but3_Ready = 0;
but4_Ready = 0;
}
# raise statue to pos 2 from inside base
else if((statue_Pos == 1) && (base_Pos == 1))
{
if((tiki_Moved == 1) && (tiki_Released == 0))
{
# play rotate sound fx
PlaySoundThing(snd_RotateStart, tiki, 1.0, 15.0, 25.0, 0);
rotSound = PlaySoundThing(snd_RotateMove, tiki, 1.0, 15.0, 25.0, 1);
Rotate(tiki, 90, 1, 3.0);
Rotate(statue, 90, 1, 3.0);
WaitForStop(tiki);
StopSound(rotSound, 0.0);
PlaySoundThing(snd_RotateStop, statue, 1.0, 15.0, 25.0, 0);
tiki_Released = 1;
}
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 0.5'), 3.0);
if(tiki_Moved == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 0.5'), 3.0);
statue_Pos = 2;
tiki_Locked = 1;
but3_Ready = 1;
but4_Ready = 1;
}
Sleep(3.0);
StopSound(loopSound, 0.0);
PlaySoundThing(snd_MoveStop, base, 1.0, 15.0, 25.0, 0);
# restore collisions
SetCollideType(statue, 3);
SetCollideType(base, 3);
SetCollideType(columnBase, 3);
MoveToFrame(button1, 0, 1.0);
# Get the player into position
ResetThing(player);
CopyOrientAndPos(indy, player);
# hide actor show player
SetThingFlags(indy, 0x80000);
ClearThingFlags(player, 0x80000);
DestroyThing(indy);
# restore camera to player
SetCameraPosition(1, GetThingPos(but1Cam));
SetCurrentCamera(1);
RestoreExtCam();
# turn off look interp
SetCameraLookInterp(2, 0);
}
# statue can't be moved
else
{
# push in button1
PlayMode(player, 60, 0);
Call speak;
# restore camera to player
SetCameraPosition(1, GetThingPos(but1Cam));
SetCurrentCamera(1);
RestoreExtCam();
}
# restore controls
ClearActorFlags(player, 0x200000);
EndCutscene();
playing = 0;
return;
# ========================================================================================
but2Push:
# do cutscene stuff
MakeMeStop();
StartCutscene(2);
# offset camera
SetExtCamLookOffsetToThing(player);
SetExtCamOffsetToThing(but2Cam);
# put away any weapon
DeselectWeaponWait(player);
# statue is in proper position, move it
if(but2_Ready == 1)
{
# push in button2
PlayMode(player, 60, 0);
Sleep(0.3);
MoveToFrame(button2, 1, 1.0);
WaitForStop(button2);
Sleep(0.5);
# Switch to but2Cam
SetCameraFocus(2, but2Cam);
SetCameraSecondaryFocus(2, player);
SetCurrentCamera(2);
SetCameraFOV(90, 0, 0.0);
# create indy actor
indy = CreateThing(tplActor, player);
CaptureThing(indy);
SetCollideType(indy, 0);
# outfit indy actor
CopyPlayerHolsters(player, indy);
# hide player show indy
SetThingFlags(player, 0x80000);
ClearThingFlags(indy, 0x80000);
# set camera interp speed turn on look interp
SetCameraInterpSpeed(2, 2.0);
SetCameraLookInterp(2, 1);
Sleep(0.01);
# interp to camTargPos2 (looking at statue)
SetCameraSecondaryFocus(2, camTargPos2);
# indy looks at statue
AISetLookThing(indy, camTargPos2);
# walk indy closer to statue
AISetMoveSpeed(indy, 1.0);
AISetLookThing(indy, but2_walkTarg);
AISetMoveThing(indy, but2_walkTarg, 0);
# remove collisions
SetCollideType(statue, 0);
SetCollideType(base, 0);
SetCollideType(columnBase, 0);
Sleep(0.01);
# play move sound fx
PlaySoundThing(snd_MoveStart, statue, 1.0, 15.0, 25.0, 0);
loopSound = PlaySoundThing(snd_MoveMove, statue, 1.0, 15.0, 25.0, 1);
# raise base to pos 1
if((base_Pos == 0) && (statue_Pos == 0))
{
MoveThingToPos(base, VectorAdd(GetThingPos(base), '0.0 0.0 0.35'), 3.0);
base_Pos = 1;
but1_Ready = 0;
but3_Ready = 0;
but4_Ready = 0;
}
# lower base to pos 0
else if((base_Pos == 1) && (statue_Pos == 0))
{
MoveThingToPos(base, VectorAdd(GetThingPos(base), '0.0 0.0 -0.35'), 3.0);
base_Pos = 0;
but1_Ready = 1;
but3_Ready = 0;
but4_Ready = 0;
}
# raise base to pos 1 and statue to pos 2
else if((base_Pos == 0) && (statue_Pos == 1))
{
if((tiki_Moved == 1) && (tiki_Released == 0))
{
# play rotate sound fx
PlaySoundThing(snd_RotateStart, statue, 1.0, 15.0, 25.0, 0);
rotSound = PlaySoundThing(snd_RotateMove, statue, 1.0, 15.0, 25.0, 1);
Rotate(tiki, 90, 1, 3.0);
Rotate(statue, 90, 1, 3.0);
WaitForStop(statue);
StopSound(rotSound, 0.0);
PlaySoundThing(snd_RotateStop, statue, 1.0, 15.0, 25.0, 0);
tiki_Released = 1;
tiki_CanLower = 1;
}
MoveThingToPos(base, VectorAdd(GetThingPos(base), '0.0 0.0 0.35'), 3.0);
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 0.35'), 3.0);
if(tiki_Moved == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 0.35'), 3.0);
statue_Pos = 2;
base_Pos = 1;
tiki_Locked = 1;
but1_Ready = 1;
but3_Ready = 1;
but4_Ready = 1;
done = 0;
}
# lower base to pos 0 and statue to pos 1
else if((base_Pos == 1) && (statue_Pos == 2))
{
MoveThingToPos(base, VectorAdd(GetThingPos(base), '0.0 0.0 -0.35'), 3.0);
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 -0.35'), 3.0);
if(tiki_Moved == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 -0.35'), 3.0);
statue_Pos = 1;
base_Pos = 0;
tiki_Locked = 0;
but1_Ready = 1;
but3_Ready = 1;
but4_Ready = 0;
}
Sleep(3.0);
StopSound(loopSound, 0.0);
PlaySoundThing(snd_MoveStop, statue, 1.0, 15.0, 25.0, 0);
# restore collisions
SetCollideType(statue, 3);
SetCollideType(base, 3);
SetCollideType(columnBase, 3);
MoveToFrame(button2, 0, 1.0);
# Get the player into position
ResetThing(player);
CopyOrientAndPos(indy, player);
# hide actor show player
SetThingFlags(indy, 0x80000);
ClearThingFlags(player, 0x80000);
DestroyThing(indy);
# restore camera to player
SetCameraPosition(1, GetThingPos(but2Cam));
SetCurrentCamera(1);
RestoreExtCam();
# turn off look interp
SetCameraLookInterp(2, 0);
}
# statue can't be moved
else
{
# push in button2
PlayMode(player, 60, 0);
Call speak;
# restore camera to player
SetCameraPosition(1, GetThingPos(but2Cam));
SetCurrentCamera(1);
RestoreExtCam();
}
# restore controls
ClearActorFlags(player, 0x200000);
EndCutscene();
playing = 0;
return;
# ========================================================================================
but3Push:
# do cutscene stuff
MakeMeStop();
StartCutscene(2);
# offset camera
SetExtCamLookOffsetToThing(player);
SetExtCamOffsetToThing(but3Cam);
# put away any weapon
DeselectWeaponWait(player);
# statue is in proper position, rotate it
if(but3_Ready == 1)
{
# push in button3
PlayMode(player, 60, 0);
Sleep(0.3);
MoveToFrame(button3, 1, 1.0);
WaitForStop(button3);
Sleep(0.5);
# switch to but3Cam
SetCameraFocus(2, but3Cam);
SetCameraSecondaryFocus(2, player);
SetCurrentCamera(2);
SetCameraFOV(90, 0, 0.0);
# create indy actor
indy = CreateThing(tplActor, player);
CaptureThing(indy);
SetCollideType(indy, 0);
# outfit indy actor
CopyPlayerHolsters(player, indy);
# hide player show indy
SetThingFlags(player, 0x80000);
ClearThingFlags(indy, 0x80000);
# set camera interp speed turn on look interp
SetCameraInterpSpeed(2, 2.0);
SetCameraLookInterp(2, 1);
Sleep(0.01);
# interp to camTargPos1 (looking at statue)
SetCameraSecondaryFocus(2, camTargPos3);
# indy looks at statue
AISetLookThing(indy, camTargPos3);
# walk indy closer to statue
AISetMoveSpeed(indy, 1.0);
AISetLookThing(indy, but3_walkTarg);
AISetMoveThing(indy, but3_walkTarg, 0);
# remove collisions
SetCollideType(statue, 0);
SetCollideType(base, 0);
SetCollideType(columnBase, 0);
Sleep(0.01);
# play rotate sound fx
PlaySoundThing(snd_RotateStart, statue, 1.0, 15.0, 25.0, 0);
rotSound = PlaySoundThing(snd_RotateMove, statue, 1.0, 15.0, 25.0, 1);
# rotate tiki to release position
if((tiki_Locked == 1) && (tiki_Released == 0) && (statue_Pos == 2))
{
Rotate(statue, 90, 1, 3.0);
Rotate(tiki, 90, 1, 3.0);
tiki_Released = 1;
tiki_CanLower = 1;
but4_Ready = 1;
but1_Ready = 0;
but2_Ready = 0;
}
# rotate tiki to locked position
else if((tiki_Locked == 1) && (tiki_Released == 1) && (statue_Pos == 2))
{
Rotate(statue, 90, 1, 3.0);
Rotate(tiki, 90, 1, 3.0);
tiki_Released = 0;
tiki_Moved = 0;
tiki_CanLower = 0;
but4_Ready = 1;
but1_Ready = 1;
but2_Ready = 1;
}
else if((tiki_Released == 0) && (statue_Pos == 1))
{
Rotate(statue, 90, 1, 3.0);
if(tiki_CanLower == 1)
{
Rotate(tiki, 90, 1, 3.0);
tiki_Released = 1;
}
else
{
tiki_Released = 0;
tiki_CanLower = 0;
}
but4_Ready = 0;
}
else if((tiki_Released == 1) && (statue_Pos == 1))
{
Rotate(statue, 90, 1, 3.0);
if(tiki_CanLower == 1)
{
Rotate(tiki, 90, 1, 3.0);
tiki_Released = 0;
}
else
{
tiki_Released = 1;
tiki_CanLower = 0;
}
but4_Ready = 0;
}
WaitForStop(statue);
StopSound(rotSound, 0.0);
PlaySoundThing(snd_RotateStop, statue, 1.0, 15.0, 25.0, 0);
# restore collisions
SetCollideType(statue, 3);
SetCollideType(base, 3);
SetCollideType(columnBase, 3);
MoveToFrame(button3, 0, 1.0);
# Get the player into position
ResetThing(player);
CopyOrientAndPos(indy, player);
# hide actor show player
SetThingFlags(indy, 0x80000);
ClearThingFlags(player, 0x80000);
DestroyThing(indy);
# restore camera to player
SetCameraPosition(1, GetThingPos(but3Cam));
SetCurrentCamera(1);
RestoreExtCam();
# turn off look interp
SetCameraLookInterp(2, 0);
}
# statue can't be moved
else
{
# push in button3
PlayMode(player, 60, 0);
Call speak;
# restore camera to player
SetCameraPosition(1, GetThingPos(but3Cam));
SetCurrentCamera(1);
RestoreExtCam();
}
# restore controls
ClearActorFlags(player, 0x200000);
EndCutscene();
playing = 0;
return;
# ========================================================================================
but4Push:
# do cutscene stuff
MakeMeStop();
StartCutscene(2);
# offset camera
SetExtCamLookOffsetToThing(player);
SetExtCamOffsetToThing(but4Cam);
# put away any weapon
DeselectWeaponWait(player);
# statue is in proper position, move it
if(but4_Ready == 1)
{
but3_Ready = 0;
# push in button4
PlayMode(player, 60, 0);
Sleep(0.3);
MoveToFrame(button4, 1, 1.0);
WaitForStop(button4);
Sleep(0.5);
# switch to statue cam
SetCameraFocus(2, but4Cam);
SetCameraSecondaryFocus(2, player);
SetCurrentCamera(2);
SetCameraFOV(90, 0, 0.0);
# create indy actor
indy = CreateThing(tplActor, player);
CaptureThing(indy);
SetCollideType(indy, 0);
# outfit indy actor
CopyPlayerHolsters(player, indy);
# hide player show indy
SetThingFlags(player, 0x80000);
ClearThingFlags(indy, 0x80000);
# set camera interp speed turn on look interp
SetCameraInterpSpeed(2, 2.0);
SetCameraLookInterp(2, 1);
Sleep(0.01);
# interp to camTargPos4 (looking at statue)
SetCameraSecondaryFocus(2, camTargPos4);
# indy looks at statue
AISetLookThing(indy, camTargPos4);
# walk indy closer to statue
AISetMoveSpeed(indy, 1.0);
AISetLookThing(indy, but4_walkTarg);
AISetMoveThing(indy, but4_walkTarg, 0);
# remove collisions
SetCollideType(statue, 0);
SetCollideType(base, 0);
SetCollideType(columnBase, 0);
Sleep(0.01);
# lower everything to ground level
if(done == 0)
{
# move everything down
MoveThingToPos(base, VectorAdd(GetThingPos(base), '0.0 0.0 -0.35'), 3.0);
if(tiki_CanLower == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 -0.35'), 3.0);
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 -0.35'), 3.0);
# play move sound fx
PlaySoundThing(snd_MoveStart, base, 1.0, 15.0, 25.0, 0);
loopSound = PlaySoundThing(snd_MoveMove, base, 1.0, 15.0, 25.0, 1);
Sleep(3.0);
StopSound(loopSound, 0.0);
PlaySoundThing(snd_MoveStop, base, 1.0, 15.0, 25.0, 0);
# rotate statue and tiki
Rotate(statue, -90, 1, 3.0);
if(tiki_CanLower == 1) Rotate(tiki, -90, 1, 3.0);
# play rotate sound fx
PlaySoundThing(snd_RotateStart, statue, 1.0, 15.0, 25.0, 0);
rotSound = PlaySoundThing(snd_RotateMove, statue, 1.0, 15.0, 25.0, 1);
WaitForStop(statue);
StopSound(rotSound, 0.0);
PlaySoundThing(snd_RotateStop, statue, 1.0, 15.0, 25.0, 0);
# move statue and tiki down
if(tiki_CanLower == 1) MoveThingToPos(tiki, VectorAdd(GetThingPos(tiki), '0.0 0.0 -0.5'), 3.0);
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 -0.5'), 3.0);
# play move sound fx
PlaySoundThing(snd_MoveStart, statue, 1.0, 15.0, 25.0, 0);
loopSound = PlaySoundThing(snd_MoveMove, statue, 1.0, 15.0, 25.0, 1);
Sleep(3.0);
StopSound(loopSound, 0.0);
PlaySoundThing(snd_MoveStop, statue, 1.0, 15.0, 25.0, 0);
done = 1;
but1_Ready = 1;
but2_Ready = 1;
but4_Ready = 0;
statue_Pos = 0;
base_Pos = 0;
tiki_Released = 0;
if(tiki_CanLower == 1) tiki_Moved = 1; # tiki came down
else tiki_Moved = 0;
}
SetCollideType(statue, 3);
SetCollideType(base, 3);
SetCollideType(columnBase, 3);
MoveToFrame(button4, 0, 1.0);
# Get the player into position
ResetThing(player);
CopyOrientAndPos(indy, player);
# hide actor show player
SetThingFlags(indy, 0x80000);
ClearThingFlags(player, 0x80000);
DestroyThing(indy);
# restore camera to player
SetCameraPosition(1, GetThingPos(but4Cam));
SetCurrentCamera(1);
RestoreExtCam();
# turn off look interp
SetCameraLookInterp(2, 0);
}
# statue can't be moved
else
{
# push in button4
PlayMode(player, 60, 0);
Call speak;
# restore camera to player
SetCameraPosition(1, GetThingPos(but4Cam));
SetCurrentCamera(1);
RestoreExtCam();
}
# restore controls
ClearActorFlags(player, 0x200000);
EndCutscene();
playing = 0;
return;
# ========================================================================================
getTiki:
# do cutscene stuff
MakeMeStop();
StartCutscene(0);
# switch cam
SetCameraFocus(2, holeCam);
SetCameraSecondaryFocus(2, target1);
SetCurrentCamera(2);
SetCameraFOV(75, 0, 0.0);
# put away any weapon
DeselectWeaponWait(player);
# create actor indy
indy = CreateThing(tplActor, player);
CaptureThing(indy);
# outfit indy actor
CopyPlayerHolsters(player, indy);
# hide player show actor
SetThingFlags(player, 0x80000);
ClearThingFlags(indy, 0x80000);
# pick up the tiki
PlayKey(indy, inReach, 4, 0x12, 0);
Sleep(0.4);
DestroyThing(tiki);
# Call the Pickup Lines cog
talkCog = GetCogByIndex(0);
SendMessage(talkCog, 27);
# sleep to wait for talkCog
Sleep(1.3);
# add tiki2 to inventory
SetInvAvailable(player, 99, 1);
ChangeInv(player, 99, 1.0);
JonesInvItemChanged(99);
# Johnny, tell the player what he's picked up
PlayVoice(player, say_Tiki, 1.3, 0);
Sleep(1.0);
# solve hint 32
SendMessage(hint_Cog, user0);
# get player into position
CopyOrientAndPos(indy, player);
# show player hide indy
ClearThingFlags(player, 0x80000);
SetThingFlags(indy, 0x80000);
# restore camera
SetCurrentCamera(curCam);
# restore controls
ClearActorFlags(player, 0x200000);
EndCutscene();
Sleep(2.0);
# turn off camera shake
SendMessage(cameraShake, user0);
# say what now voice line
PlayVoice(player, inWhat, 1.0, 0);
# move statue and base to bottom
MoveThingToPos(statue, VectorAdd(GetThingPos(statue), '0.0 0.0 -0.6'), 2.0);
MoveThingToPos(base, VectorAdd(GetThingPos(base), '0.0 0.0 -0.6'), 2.0);
# play move sound fx
PlaySoundThing(snd_MoveStart, statue, 1.0, 15.0, 25.0, 0);
loopSound = PlaySoundThing(snd_MoveMove, statue, 1.0, 15.0, 25.0, 1);
Sleep(2.0);
StopSound(loopSound, 0.0);
PlaySoundThing(snd_MoveStop, statue, 1.0, 15.0, 25.0, 0);
Sleep(0.5);
# turn off camera shake
SendMessage(cameraShake, user1);
Sleep(0.5);
return;
# ========================================================================================
speak:
playing = 1;
PlayVoice(player, in_Line0, 1.0, 1);
return;
# ========================================================================================
blocked:
Print("Tiki1Statue: blocked");
return;
# ========================================================================================
end